home *** CD-ROM | disk | FTP | other *** search
/ Champak 66 / Vol 66.iso / games / angel_fr.swf / scripts / frame_4 / DoAction_3.as < prev    next >
Text File  |  2013-04-24  |  3KB  |  105 lines

  1. stop();
  2. var end_score_check = 0;
  3. make_end_score_board = function()
  4. {
  5.    sound_play(3,1,1);
  6.    trace("score=" + score);
  7.    score_board.onEnterFrame = function()
  8.    {
  9.       plus_end_score(Math.ceil(score / 40));
  10.    };
  11. };
  12. plus_end_score = function(num, re_flag)
  13. {
  14.    end_score_check += num;
  15.    var _loc2_ = String(end_score_check).split("").reverse();
  16.    var _loc1_ = 0;
  17.    while(_loc1_ < 7)
  18.    {
  19.       game_over_m.end_score_board["s" + _loc1_].gotoAndStop(1);
  20.       _loc1_ = _loc1_ + 1;
  21.    }
  22.    _loc1_ = 0;
  23.    while(_loc1_ < _loc2_.length)
  24.    {
  25.       game_over_m.end_score_board["s" + _loc1_].gotoAndStop(parseInt(_loc2_[_loc1_]) + 1);
  26.       _loc1_ = _loc1_ + 1;
  27.    }
  28.    if(end_score_check >= score)
  29.    {
  30.       delete score_board.onEnterFrame;
  31.       end_score_check = score;
  32.       if(!re_flag)
  33.       {
  34.          so3.stop("so3");
  35.          plus_end_score(0,true);
  36.          i_angel_send = setInterval(function()
  37.          {
  38.             angel_send_score();
  39.             clearInterval(i_angel_send);
  40.          }
  41.          ,2000);
  42.       }
  43.    }
  44. };
  45. angel_end._visible = false;
  46. angel_end.swapDepths(2000000);
  47. var all_pause_time = 0;
  48. var now_pause_time = 0;
  49. var game_start_time = getTimer();
  50. var score_send_ok = false;
  51. angel_send_score = function()
  52. {
  53.    angel_end._visible = true;
  54.    sendVars = new LoadVars();
  55.    recVars = new LoadVars();
  56.    sendVars.uid = uid;
  57.    sendVars.pt = score;
  58.    sendVars.rt = Math.floor((getTimer() - game_start_time - all_pause_time) / 1000);
  59.    sendVars.ot1 = ot1;
  60.    sendVars.ot2 = ot2;
  61.    sendVars.ot3 = ot3;
  62.    sendVars.ot4 = ot4;
  63.    sendVars.ot5 = ot5;
  64.    var i = 1;
  65.    while(i < 6)
  66.    {
  67.       if(eval("ot" + i) == null || eval("ot" + i) == undefined || eval("ot" + i) == "")
  68.       {
  69.          sendVars["ot" + i] = "";
  70.       }
  71.       else
  72.       {
  73.          sendVars["ot" + i] = _root["ot" + i];
  74.       }
  75.       i++;
  76.    }
  77.    trace("sendVars= " + sendVars);
  78.    sendVars.sendAndLoad("http://www.gameangel.com/System/gameangel/game_rank.proc.php",recVars,"POST");
  79.    recVars.onLoad = function(success)
  80.    {
  81.       angel_end.name_txt = recVars.nick;
  82.       angel_end.score_txt = score;
  83.       angel_end.rank_txt = recVars.rank;
  84.    };
  85.    angel_end.angel_restart_bt.onRelease = function()
  86.    {
  87.       end_clear();
  88.       _root.gotoAndStop(2);
  89.    };
  90.    angel_end.angel_restart_bt.onRollOver = function()
  91.    {
  92.       so17.start(0,1);
  93.    };
  94. };
  95. end_clear = function()
  96. {
  97.    var i = 0;
  98.    for(var obj in _root)
  99.    {
  100.       i++;
  101.       eval(obj).swapDepths(-5000 + i);
  102.       trace("obj " + i + " =" + obj);
  103.    }
  104. };
  105.